package com.hjm.project.terminal.record.mapper;

import com.hjm.project.terminal.record.domain.TerminalRecord;

import java.util.List;
import java.util.Map;

/**
 * 终端划拨记录Mapper接口
 * 
 * @author LOVE
 * @date 2020-11-28
 */
public interface TerminalRecordMapper 
{
    /**
     * 查询终端划拨记录
     * 
     * @param id 终端划拨记录ID
     * @return 终端划拨记录
     */
    public TerminalRecord selectTerminalRecordById(Long id);

    /**
     * 查询终端划拨记录列表
     * 
     * @param terminalRecord 终端划拨记录
     * @return 终端划拨记录集合
     */
    public List<TerminalRecord> selectTerminalRecordList(TerminalRecord terminalRecord);

    /**
     * 新增终端划拨记录
     * 
     * @param terminalRecord 终端划拨记录
     * @return 结果
     */
    public int insertTerminalRecord(TerminalRecord terminalRecord);

    /**
     * 修改终端划拨记录
     * 
     * @param terminalRecord 终端划拨记录
     * @return 结果
     */
    public int updateTerminalRecord(TerminalRecord terminalRecord);


    public int updateTerminalRecordCj(TerminalRecord terminalRecord);


    /**
     * 删除终端划拨记录
     * 
     * @param id 终端划拨记录ID
     * @return 结果
     */
    public int deleteTerminalRecordById(Long id);

    /**
     * 批量删除终端划拨记录
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteTerminalRecordByIds(String[] ids);

    public List<Map<String, Object>> getTerminal(List<String> poses);

    public List<Map<String, Object>> getTerminalMap(Map map);

    public List<Map<String, Object>> getTerminalMapNostatus(Map map);


    public int saveBindingPosBatch(List<Map<String, String>> posList);

    public int updateTerminalUse(List<Map<String, String>> posList);

    public List<Map<String, Object>> getGiveSNInfo(Map terminalRecordMap);

    public int terminalRecordSerial();

    public int addTerminalRecord(Map terminalRecordMap);

    public int addBatchTerminalRecordDetails(List<Map> terminalRecordDetails);

    public int saveAgentApplyInfo(Map messMap);

    public int insertTerRecordDe(Map map);

    public int insertTerRecord(Map map);

    public List<Map<String, Object>> getUseTerminal(List<String> poses);
    public List<Map<String, Object>> getUseTerminalMap(Map map);

    public int updateBranchPosInfo(Map map);

    public List<Map> selectBranchPosInfo(Map map);


    public int deleteNextSn(Map<String, Object> para );

    public int updateTerminalNotUse(List<Map<String, String>> posList);

    String getPosNoNum(String tempPosNo);
}
